Fix key sort order functions
authorJustin Burkett <justin@burkett.cc>
Tue, 22 Jun 2021 03:34:18 +0000 (23:34 -0400)
committerJustin Burkett <justin@burkett.cc>
Tue, 22 Jun 2021 03:34:18 +0000 (23:34 -0400)
We now always get the full key description (prefix + binding)

which-key.el

index 13c440d68ba9e6013e447503646afe683414a257..2d81d2e2739a3675e7c1c8276590be8de768e852 100644 (file)
@@ -1343,7 +1343,9 @@ width) in lines and characters respectively."
   "Sorting function used for `which-key-key-order' and
 `which-key-key-order-alpha'."
   (save-match-data
-    (let* ((rngrgxp "^\\([^ ]+\\) \\.\\. [^ ]+")
+    (let* ((a (which-key--extract-key a))
+           (b (which-key--extract-key b))
+           (rngrgxp "^\\([^ ]+\\) \\.\\. [^ ]+")
            (a (if (string-match rngrgxp a) (match-string 1 a) a))
            (b (if (string-match rngrgxp b) (match-string 1 b) b))
            (aem? (string-equal a ""))